-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
identify: filter received addresses based on the node's remote address #2300
Conversation
f9b68a3
to
d960964
Compare
If you want a connection with a remote addr on private IP and a remote addr on loopback ip, it should be possible to do this by listening on "0.0.0.0" address and dialing only the private or the loopback address. Testing public ips does look impossible. |
p2p/protocol/identify/id.go
Outdated
if _, err := cab.ConsumePeerRecord(signedPeerRecord, ttl); err != nil { | ||
log.Debugf("error adding signed addrs to peerstore: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for this to be effective, these addresses need to be filtered too, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. I've done some digging and convinced myself that the ConsumePeerRecord
API is flawed. Will open a separate issue for that.
d960964
to
cf0ca1b
Compare
Yes. We can take signed peer records separately. |
Unfortunately, this is impossible to test. I tried using mocknet, but of course that thing is so horribly broken that it can't even reliably set the correct remote address of a connection. It fails at the most easy thing it was designed to do.